<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>MeCab: MeCab::Model Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MeCab
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceMeCab.html">MeCab</a>      </li>
      <li class="navelem"><a class="el" href="classMeCab_1_1Model.html">Model</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">MeCab::Model Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="MeCab::Model" -->
<p><a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> class.  
 <a href="classMeCab_1_1Model.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="mecab_8h_source.html">mecab.h</a>&gt;</code></p>

<p><a href="classMeCab_1_1Model-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="namespaceMeCab.html#a581b6e7f533add983ea9dabc4a44166b">DictionaryInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#a04a93b36403d155f4cedfb138a7b2b51">dictionary_info</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return DictionaryInfo linked list.  <a href="#a04a93b36403d155f4cedfb138a7b2b51"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#ad89d4de4fa9da5e9ac7045e72f2fbb1e">transition_cost</a> (unsigned short rcAttr, unsigned short lcAttr) const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return transtion cost from rcAttr to lcAttr.  <a href="#ad89d4de4fa9da5e9ac7045e72f2fbb1e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceMeCab.html#a3679371b5a373ad35e86a545b5f0d127">Node</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#aceb584e540634045adf0172e5fbc59a7">lookup</a> (const char *begin, const char *end, <a class="el" href="classMeCab_1_1Lattice.html">Lattice</a> *lattice) const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">perform common prefix search from the range [begin, end).  <a href="#aceb584e540634045adf0172e5fbc59a7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classMeCab_1_1Tagger.html">Tagger</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#a9d9135a4431adb3a985153cb4ab8f3a1">createTagger</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new <a class="el" href="classMeCab_1_1Tagger.html" title="Tagger class.">Tagger</a> object.  <a href="#a9d9135a4431adb3a985153cb4ab8f3a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classMeCab_1_1Lattice.html">Lattice</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#aa70febf1573213287214a1fa626e186d">createLattice</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new <a class="el" href="classMeCab_1_1Lattice.html" title="Lattice class.">Lattice</a> object.  <a href="#aa70febf1573213287214a1fa626e186d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#a0423e56cbbec00e974b75bd1dfed3642">swap</a> (<a class="el" href="classMeCab_1_1Model.html">Model</a> *model)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap the instance with |model|.  <a href="#a0423e56cbbec00e974b75bd1dfed3642"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#abccfe166fbb9db7ab5fe8479657dd63c">~Model</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#af6d63f8eb887b8b147bdb87a34b06bee">version</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a version string.  <a href="#af6d63f8eb887b8b147bdb87a34b06bee"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classMeCab_1_1Model.html">Model</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#a90cf2948b06f72de9e07383363fe5d90">create</a> (int argc, char **argv)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Factory method to create a new <a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> with a specified main's argc/argv-style parameters.  <a href="#a90cf2948b06f72de9e07383363fe5d90"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classMeCab_1_1Model.html">Model</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMeCab_1_1Model.html#ac17ea89f12a392ca5d1d1bfcf7a89584">create</a> (const char *arg)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Factory method to create a new <a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> with a string parameter representation, i.e., "-d /user/local/mecab/dic/ipadic -Ochasen".  <a href="#ac17ea89f12a392ca5d1d1bfcf7a89584"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> class. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="abccfe166fbb9db7ab5fe8479657dd63c"></a><!-- doxytag: member="MeCab::Model::~Model" ref="abccfe166fbb9db7ab5fe8479657dd63c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classMeCab_1_1Model.html#abccfe166fbb9db7ab5fe8479657dd63c">MeCab::Model::~Model</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a90cf2948b06f72de9e07383363fe5d90"></a><!-- doxytag: member="MeCab::Model::create" ref="a90cf2948b06f72de9e07383363fe5d90" args="(int argc, char **argv)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classMeCab_1_1Model.html">Model</a>* <a class="el" href="classMeCab_1_1Model.html#a90cf2948b06f72de9e07383363fe5d90">MeCab::Model::create</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>argv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Factory method to create a new <a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> with a specified main's argc/argv-style parameters. </p>
<p>Return NULL if new model cannot be initialized. Use <a class="el" href="namespaceMeCab.html#af6b513c7789770d47bdf64f9b86f8445" title="Return last error string.">MeCab::getLastError()</a> to obtain the cause of the errors. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>new <a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> object </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">argc</td><td>number of parameters </td></tr>
    <tr><td class="paramname">argv</td><td>parameter list </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac17ea89f12a392ca5d1d1bfcf7a89584"></a><!-- doxytag: member="MeCab::Model::create" ref="ac17ea89f12a392ca5d1d1bfcf7a89584" args="(const char *arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classMeCab_1_1Model.html">Model</a>* <a class="el" href="classMeCab_1_1Model.html#a90cf2948b06f72de9e07383363fe5d90">MeCab::Model::create</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>arg</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Factory method to create a new <a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> with a string parameter representation, i.e., "-d /user/local/mecab/dic/ipadic -Ochasen". </p>
<p>Return NULL if new model cannot be initialized. Use <a class="el" href="namespaceMeCab.html#af6b513c7789770d47bdf64f9b86f8445" title="Return last error string.">MeCab::getLastError()</a> to obtain the cause of the errors. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>new <a class="el" href="classMeCab_1_1Model.html" title="Model class.">Model</a> object </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">arg</td><td>single string representation of the argment. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa70febf1573213287214a1fa626e186d"></a><!-- doxytag: member="MeCab::Model::createLattice" ref="aa70febf1573213287214a1fa626e186d" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classMeCab_1_1Lattice.html">Lattice</a>* <a class="el" href="classMeCab_1_1Model.html#aa70febf1573213287214a1fa626e186d">MeCab::Model::createLattice</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a new <a class="el" href="classMeCab_1_1Lattice.html" title="Lattice class.">Lattice</a> object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>new <a class="el" href="classMeCab_1_1Lattice.html" title="Lattice class.">Lattice</a> object </dd></dl>

</div>
</div>
<a class="anchor" id="a9d9135a4431adb3a985153cb4ab8f3a1"></a><!-- doxytag: member="MeCab::Model::createTagger" ref="a9d9135a4431adb3a985153cb4ab8f3a1" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classMeCab_1_1Tagger.html">Tagger</a>* <a class="el" href="classMeCab_1_1Model.html#a9d9135a4431adb3a985153cb4ab8f3a1">MeCab::Model::createTagger</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a new <a class="el" href="classMeCab_1_1Tagger.html" title="Tagger class.">Tagger</a> object. </p>
<p>All returned tagger object shares this model object as a parsing model. Never delete this model object before deleting tagger object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>new <a class="el" href="classMeCab_1_1Tagger.html" title="Tagger class.">Tagger</a> object </dd></dl>

</div>
</div>
<a class="anchor" id="a04a93b36403d155f4cedfb138a7b2b51"></a><!-- doxytag: member="MeCab::Model::dictionary_info" ref="a04a93b36403d155f4cedfb138a7b2b51" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="namespaceMeCab.html#a581b6e7f533add983ea9dabc4a44166b">DictionaryInfo</a>* <a class="el" href="classMeCab_1_1Model.html#a04a93b36403d155f4cedfb138a7b2b51">MeCab::Model::dictionary_info</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return DictionaryInfo linked list. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>DictionaryInfo linked list </dd></dl>

</div>
</div>
<a class="anchor" id="aceb584e540634045adf0172e5fbc59a7"></a><!-- doxytag: member="MeCab::Model::lookup" ref="aceb584e540634045adf0172e5fbc59a7" args="(const char *begin, const char *end, Lattice *lattice) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="namespaceMeCab.html#a3679371b5a373ad35e86a545b5f0d127">Node</a>* <a class="el" href="classMeCab_1_1Model.html#aceb584e540634045adf0172e5fbc59a7">MeCab::Model::lookup</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classMeCab_1_1Lattice.html">Lattice</a> *&#160;</td>
          <td class="paramname"><em>lattice</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>perform common prefix search from the range [begin, end). </p>
<p>|lattice| takes the ownership of return value. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>node linked list. </dd></dl>

</div>
</div>
<a class="anchor" id="a0423e56cbbec00e974b75bd1dfed3642"></a><!-- doxytag: member="MeCab::Model::swap" ref="a0423e56cbbec00e974b75bd1dfed3642" args="(Model *model)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classMeCab_1_1Model.html#a0423e56cbbec00e974b75bd1dfed3642">MeCab::Model::swap</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classMeCab_1_1Model.html">Model</a> *&#160;</td>
          <td class="paramname"><em>model</em></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Swap the instance with |model|. </p>
<p>The ownership of |model| always moves to this instance, meaning that passed |model| will no longer be accessible after calling this method. return true if new model is swapped successfully. This method is thread safe. All taggers created by <a class="el" href="classMeCab_1_1Model.html#a9d9135a4431adb3a985153cb4ab8f3a1" title="Create a new Tagger object.">Model::createTagger()</a> method will also be updated asynchronously. No need to stop the parsing thread excplicitly before swapping model object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>boolean </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">model</td><td>new model which is going to be swapped with the current model. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad89d4de4fa9da5e9ac7045e72f2fbb1e"></a><!-- doxytag: member="MeCab::Model::transition_cost" ref="ad89d4de4fa9da5e9ac7045e72f2fbb1e" args="(unsigned short rcAttr, unsigned short lcAttr) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int <a class="el" href="classMeCab_1_1Model.html#ad89d4de4fa9da5e9ac7045e72f2fbb1e">MeCab::Model::transition_cost</a> </td>
          <td>(</td>
          <td class="paramtype">unsigned short&#160;</td>
          <td class="paramname"><em>rcAttr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned short&#160;</td>
          <td class="paramname"><em>lcAttr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return transtion cost from rcAttr to lcAttr. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>transtion cost </dd></dl>

</div>
</div>
<a class="anchor" id="af6d63f8eb887b8b147bdb87a34b06bee"></a><!-- doxytag: member="MeCab::Model::version" ref="af6d63f8eb887b8b147bdb87a34b06bee" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static const char* <a class="el" href="classMeCab_1_1Model.html#af6d63f8eb887b8b147bdb87a34b06bee">MeCab::Model::version</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return a version string. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>version string </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/home/taku/proj/mecab/mecab/src/<a class="el" href="mecab_8h_source.html">mecab.h</a></li>
</ul>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 18 2013 02:23:58 for MeCab by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
